/*
    cgq 2019 12 3
    通过原型链 快捷处理方法
*/

/* 格式化时间 */
/*eslint-disable */
Date.prototype.times = function (t) {
    let time = new Date()
    time.setTime(this)
    var Year = time.getFullYear()
    var Month = time.getMonth() + 1
    var Data = time.getDate() < 10 ? 0 + '' + time.getDate() : time.getDate()
    var hour = time.getHours() < 10 ? 0 + '' + time.getHours() : time.getHours()
    var Minutes = time.getMinutes() < 10 ? 0 + '' + time.getMinutes() : time.getMinutes()
    var Seconds = time.getSeconds() < 10 ? 0 + '' + time.getSeconds() : time.getSeconds()
    if (Month < 10) {
        Month = (0 + '') + Month
    }
    return Year + '-' + Month + '-' + Data + ' ' + hour + ':' + Minutes + ':' + Seconds
}
